package cn.zijiancode.starter.listener;

import cn.zijiancode.starter.handler.DemoHandler;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;

import javax.annotation.Resource;

/**
 * @author Zijian Liao
 * @since 1.0.0
 */
public class DemoListener implements ApplicationListener<ContextRefreshedEvent> {

    @Resource
    private DemoHandler demoHandler;

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        demoHandler.hello();
    }
}
